package hr.ctg.domain.action.park;

import hr.ctg.domain.model.Park;
import hr.ctg.service.dao.ParkDAO;

import java.util.List;

import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.web.RequestParameter;

@Name("parkSearchAction")
public class ParkSearchAction {
	@In
	ParkDAO parkDAO;

	@RequestParameter
	String tipParka;

	@Factory("parkovi")
	public List<Park> getParkovi() {
		return parkDAO.findByTip(tipParka);
	}

}
